package com.closer.server.biz.problem.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

import java.io.Serial;

import com.mybatisflex.core.keygen.KeyGenerators;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 题目表 实体类。
 *
 * @author closer
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("problem")
public class Problem implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 题目ID
     */
    @Id(keyType = KeyType.Generator ,value = KeyGenerators.snowFlakeId)
    private Long id;

    /**
     * 题目标题
     */
    private String title;

    /**
     * 题目描述
     */
    private String description;

    /**
     * 题目难度 0-简单 1-中等 2-困难
     */
    private Integer difficulty;

    /**
     * 判题配置（json 对象）
     */
    private String judgeConfig;

    /**
     * 输入描述
     */
    private String inputDescription;

    /**
     * 输出描述
     */
    private String outputDescription;

    /**
     * 样例输入
     */
    private String sampleInput;

    /**
     * 样例输出
     */
    private String sampleOutput;

    /**
     * 题目提示
     */
    private String hint;

    /**
     * 创建者用户ID
     */
    private Long createdUserId;

    /**
     * 是否可见 0-不可见 1-可见
     */
    private Integer visible;

    /**
     * 提交次数
     */
    private Long submissionCount;

    /**
     * 通过次数
     */
    private Long acceptedCount;

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 是否删除
     */
    @Column(isLogicDelete = true)
    private Integer isDelete;

}
